package mdp.algorithm.explore;

public class Sensors {
	private int sensorFXLocationRow, sensorFXLocationCol, sensorFYLocationRow, sensorFYLocationCol, 
	sensorFZLocationRow, sensorFZLocationCol;//Front Sensors
	private int sensorLVLocationRow, sensorLVLocationCol, sensorLWLocationRow, sensorLWLocationCol, 
	sensorLXLocationRow, sensorLXLocationCol, sensorLYLocationRow, sensorLYLocationCol, 
	sensorLZLocationRow, sensorLZLocationCol; //Left Sensors 
	private int sensorRVLocationRow, sensorRVLocationCol, sensorRWLocationRow, sensorRWLocationCol, 
	sensorRXLocationRow, sensorRXLocationCol, sensorRYLocationRow, sensorRYLocationCol, 
	sensorRZLocationRow, sensorRZLocationCol; //Right Sensors
	
	private boolean frontObstacles[] = new boolean[3];
	private boolean leftObstacles[] = new boolean[5];
	private boolean rightObstacles[] = new boolean[5];
	
	private int frontSensorsLocationRow[] = new int[3];
	private int frontSensorsLocationCol[] = new int[3];
	private int leftSensorsLocationsRow[] = new int[5];
	private int leftSensorsLocationsCol[] = new int[5];
	private int rightSensorsLocationsRow[] = new int[5];
	private int rightSensorsLocationsCol[] = new int[5];
	
	public void setFrontSensors(int fxRow, int fxCol, int fyRow, int fyCol, int fzRow, int fzCol) {
		sensorFXLocationRow = fxRow;
		sensorFXLocationCol = fxCol;
		sensorFYLocationRow = fyRow;
		sensorFYLocationCol = fyCol;
		sensorFZLocationRow = fzRow;
		sensorFZLocationCol = fzCol;
	}
	
	public void setLeftSensors(int lvRow, int lvCol, int lwRow, int lwCol, int lxRow, int lxCol, int lyRow, int lyCol, int lzRow, int lzCol) {
		sensorLVLocationRow = lvRow;
		sensorLVLocationCol = lvCol;
		sensorLWLocationRow = lwRow;
		sensorLWLocationCol = lwCol;
		sensorLXLocationRow = lxRow;
		sensorLXLocationCol = lxCol;
		sensorLYLocationRow = lyRow;
		sensorLYLocationCol = lyCol;
		sensorLZLocationRow = lzRow;
		sensorLZLocationCol = lzCol;
	}
	
	public void setRightSensors(int rvRow, int rvCol, int rwRow, int rwCol, int rxRow, int rxCol, int ryRow, int ryCol, int rzRow, int rzCol) {
		sensorRVLocationRow = rvRow;
		sensorRVLocationCol = rvCol;
		sensorRWLocationRow = rwRow;
		sensorRWLocationCol = rwCol;
		sensorRXLocationRow = rxRow;
		sensorRXLocationCol = rxCol;
		sensorRYLocationRow = ryRow;
		sensorRYLocationCol = ryCol;
		sensorRZLocationRow = rzRow;
		sensorRZLocationCol = rzCol;
	}
	
	public int getFxRow() {
		return sensorFXLocationRow;
	}
	public int getFxCol() {
		return sensorFXLocationCol;
	}
	public int getFyRow() {
		return sensorFYLocationRow;
	}
	public int getFyCol() {
		return sensorFYLocationCol;
	}
	public int getFzRow() {
		return sensorFZLocationRow;
	}
	public int getFzCol() {
		return sensorFZLocationCol;
	}

	public int getSensorLVLocationRow() {
		return sensorLVLocationRow;
	}

	public int getSensorLVLocationCol() {
		return sensorLVLocationCol;
	}

	public int getSensorLWLocationRow() {
		return sensorLWLocationRow;
	}

	public int getSensorLWLocationCol() {
		return sensorLWLocationCol;
	}

	public int getSensorLXLocationRow() {
		return sensorLXLocationRow;
	}

	public int getSensorLXLocationCol() {
		return sensorLXLocationCol;
	}

	public int getSensorLYLocationRow() {
		return sensorLYLocationRow;
	}

	public int getSensorLYLocationCol() {
		return sensorLYLocationCol;
	}

	public int getSensorLZLocationRow() {
		return sensorLZLocationRow;
	}

	public int getSensorLZLocationCol() {
		return sensorLZLocationCol;
	}

	public int getSensorRVLocationRow() {
		return sensorRVLocationRow;
	}

	public int getSensorRVLocationCol() {
		return sensorRVLocationCol;
	}

	public int getSensorRWLocationRow() {
		return sensorRWLocationRow;
	}

	public int getSensorRWLocationCol() {
		return sensorRWLocationCol;
	}

	public int getSensorRXLocationRow() {
		return sensorRXLocationRow;
	}

	public int getSensorRXLocationCol() {
		return sensorRXLocationCol;
	}

	public int getSensorRYLocationRow() {
		return sensorRYLocationRow;
	}

	public int getSensorRYLocationCol() {
		return sensorRYLocationCol;
	}

	public int getSensorRZLocationRow() {
		return sensorRZLocationRow;
	}

	public int getSensorRZLocationCol() {
		return sensorRZLocationCol;
	}

	public void setSensorFXLocationRow(int sensorFXLocationRow) {
		this.sensorFXLocationRow = sensorFXLocationRow;
	}

	public void setSensorFXLocationCol(int sensorFXLocationCol) {
		this.sensorFXLocationCol = sensorFXLocationCol;
	}

	public void setSensorFYLocationRow(int sensorFYLocationRow) {
		this.sensorFYLocationRow = sensorFYLocationRow;
	}

	public void setSensorFYLocationCol(int sensorFYLocationCol) {
		this.sensorFYLocationCol = sensorFYLocationCol;
	}

	public void setSensorFZLocationRow(int sensorFZLocationRow) {
		this.sensorFZLocationRow = sensorFZLocationRow;
	}

	public void setSensorFZLocationCol(int sensorFZLocationCol) {
		this.sensorFZLocationCol = sensorFZLocationCol;
	}

	public void setSensorLVLocationRow(int sensorLVLocationRow) {
		this.sensorLVLocationRow = sensorLVLocationRow;
	}

	public void setSensorLVLocationCol(int sensorLVLocationCol) {
		this.sensorLVLocationCol = sensorLVLocationCol;
	}

	public void setSensorLWLocationRow(int sensorLWLocationRow) {
		this.sensorLWLocationRow = sensorLWLocationRow;
	}

	public void setSensorLWLocationCol(int sensorLWLocationCol) {
		this.sensorLWLocationCol = sensorLWLocationCol;
	}

	public void setSensorLXLocationRow(int sensorLXLocationRow) {
		this.sensorLXLocationRow = sensorLXLocationRow;
	}

	public void setSensorLXLocationCol(int sensorLXLocationCol) {
		this.sensorLXLocationCol = sensorLXLocationCol;
	}

	public void setSensorLYLocationRow(int sensorLYLocationRow) {
		this.sensorLYLocationRow = sensorLYLocationRow;
	}

	public void setSensorLYLocationCol(int sensorLYLocationCol) {
		this.sensorLYLocationCol = sensorLYLocationCol;
	}

	public void setSensorLZLocationRow(int sensorLZLocationRow) {
		this.sensorLZLocationRow = sensorLZLocationRow;
	}

	public void setSensorLZLocationCol(int sensorLZLocationCol) {
		this.sensorLZLocationCol = sensorLZLocationCol;
	}

	public void setSensorRVLocationRow(int sensorRVLocationRow) {
		this.sensorRVLocationRow = sensorRVLocationRow;
	}

	public void setSensorRVLocationCol(int sensorRVLocationCol) {
		this.sensorRVLocationCol = sensorRVLocationCol;
	}

	public void setSensorRWLocationRow(int sensorRWLocationRow) {
		this.sensorRWLocationRow = sensorRWLocationRow;
	}

	public void setSensorRWLocationCol(int sensorRWLocationCol) {
		this.sensorRWLocationCol = sensorRWLocationCol;
	}

	public void setSensorRXLocationRow(int sensorRXLocationRow) {
		this.sensorRXLocationRow = sensorRXLocationRow;
	}

	public void setSensorRXLocationCol(int sensorRXLocationCol) {
		this.sensorRXLocationCol = sensorRXLocationCol;
	}

	public void setSensorRYLocationRow(int sensorRYLocationRow) {
		this.sensorRYLocationRow = sensorRYLocationRow;
	}

	public void setSensorRYLocationCol(int sensorRYLocationCol) {
		this.sensorRYLocationCol = sensorRYLocationCol;
	}

	public void setSensorRZLocationRow(int sensorRZLocationRow) {
		this.sensorRZLocationRow = sensorRZLocationRow;
	}

	public void setSensorRZLocationCol(int sensorRZLocationCol) {
		this.sensorRZLocationCol = sensorRZLocationCol;
	}
	
	public void setFrontObstacles(int index, boolean blocked) {
		frontObstacles[index] = blocked;
	}
	
	public boolean[] getFrontObstacles() {
		return frontObstacles;
	}
	public boolean getFrontObstacles(int index) {
		return frontObstacles[index];
	}
	
	public void setLeftObstacles(int index, boolean blocked) {
		leftObstacles[index] = blocked;
	}
	
	public boolean[] getLeftObstacles() {
		return leftObstacles;
	}
	
	public boolean getLeftObstacles(int index) {
		return leftObstacles[index];
	}
	
	public void setRightObstacles(int index, boolean blocked) {
		rightObstacles[index] = blocked;
	}
	
	public boolean[] getRightObstacles() {
		return rightObstacles;
	}

	public boolean getRightObstacles(int index) {
		return rightObstacles[index];
	}
	public int[] getFrontSensorRow() {
		frontSensorsLocationRow[0] = sensorFXLocationRow;
		frontSensorsLocationRow[1] = sensorFYLocationRow;
		frontSensorsLocationRow[2] = sensorFZLocationRow;
		
		return frontSensorsLocationRow;
	}	
	public int getFrontSensorRow(int index) {
		frontSensorsLocationRow[0] = sensorFXLocationRow;
		frontSensorsLocationRow[1] = sensorFYLocationRow;
		frontSensorsLocationRow[2] = sensorFZLocationRow;
		
		return frontSensorsLocationRow[index];
	}
	public int[] getFrontSensorCol() {
		frontSensorsLocationCol[0] = sensorFXLocationCol;
		frontSensorsLocationCol[1] = sensorFYLocationCol;
		frontSensorsLocationCol[2] = sensorFZLocationCol;
		
		return frontSensorsLocationRow;
	}	
	public int getFrontSensorCol(int index) {
		frontSensorsLocationCol[0] = sensorFXLocationCol;
		frontSensorsLocationCol[1] = sensorFYLocationCol;
		frontSensorsLocationCol[2] = sensorFZLocationCol;
		
		return frontSensorsLocationCol[index];
	}
	
	public int[] getLeftSensorRow() {
		leftSensorsLocationsRow[0] = sensorLVLocationRow;
		leftSensorsLocationsRow[1] = sensorLWLocationRow;
		leftSensorsLocationsRow[2] = sensorLXLocationRow;
		leftSensorsLocationsRow[3] = sensorLYLocationRow;
		leftSensorsLocationsRow[4] = sensorLZLocationRow;
		
		return leftSensorsLocationsRow;
	}
	
	public int getLeftSensorRow(int index) {
		leftSensorsLocationsRow[0] = sensorLVLocationRow;
		leftSensorsLocationsRow[1] = sensorLWLocationRow;
		leftSensorsLocationsRow[2] = sensorLXLocationRow;
		leftSensorsLocationsRow[3] = sensorLYLocationRow;
		leftSensorsLocationsRow[4] = sensorLZLocationRow;
		
		return leftSensorsLocationsRow[index];
	}
	
	public int[] getLeftSensorCol() {
		leftSensorsLocationsCol[0] = sensorLVLocationCol;
		leftSensorsLocationsCol[1] = sensorLWLocationCol;
		leftSensorsLocationsCol[2] = sensorLXLocationCol;
		leftSensorsLocationsCol[3] = sensorLYLocationCol;
		leftSensorsLocationsCol[4] = sensorLZLocationCol;
		
		return leftSensorsLocationsCol;
	}
	
	public int getLeftSensorCol(int index) {
		leftSensorsLocationsCol[0] = sensorLVLocationCol;
		leftSensorsLocationsCol[1] = sensorLWLocationCol;
		leftSensorsLocationsCol[2] = sensorLXLocationCol;
		leftSensorsLocationsCol[3] = sensorLYLocationCol;
		leftSensorsLocationsCol[4] = sensorLZLocationCol;
		
		return leftSensorsLocationsCol[index];
	}
	
	public int[] getRightSensorRow() {
		rightSensorsLocationsRow[0] = sensorRVLocationRow;
		rightSensorsLocationsRow[1] = sensorRWLocationRow;
		rightSensorsLocationsRow[2] = sensorRXLocationRow;
		rightSensorsLocationsRow[3] = sensorRYLocationRow;
		rightSensorsLocationsRow[4] = sensorRZLocationRow;
		
		return rightSensorsLocationsRow;
	}
	
	public int getRightSensorRow(int index) {
		rightSensorsLocationsRow[0] = sensorRVLocationRow;
		rightSensorsLocationsRow[1] = sensorRWLocationRow;
		rightSensorsLocationsRow[2] = sensorRXLocationRow;
		rightSensorsLocationsRow[3] = sensorRYLocationRow;
		rightSensorsLocationsRow[4] = sensorRZLocationRow;
		
		return rightSensorsLocationsRow[index];
	}
	
	public int[] getRightSensorCol() {
		rightSensorsLocationsCol[0] = sensorRVLocationCol;
		rightSensorsLocationsCol[1] = sensorRWLocationCol;
		rightSensorsLocationsCol[2] = sensorRXLocationCol;
		rightSensorsLocationsCol[3] = sensorRYLocationCol;
		rightSensorsLocationsCol[4] = sensorRZLocationCol;
		
		return rightSensorsLocationsCol;
	}
	
	public int getRightSensorCol(int index) {
		rightSensorsLocationsCol[0] = sensorRVLocationCol;
		rightSensorsLocationsCol[1] = sensorRWLocationCol;
		rightSensorsLocationsCol[2] = sensorRXLocationCol;
		rightSensorsLocationsCol[3] = sensorRYLocationCol;
		rightSensorsLocationsCol[4] = sensorRZLocationCol;
		
		return rightSensorsLocationsCol[index];
	}
}
